#coding=utf-8
__author__ = 'chutf'
__date__ = '2020/4/4 20:02'

from  django.contrib.auth.decorators import  login_required
from  django.utils.decorators import method_decorator


class LoginRequiredMixin(object):
    @method_decorator(login_required(login_url='/login/'))
    def dispatch(self,request,*args,**kwargs):
        return  super(LoginRequiredMixin,self).dispatch(request,*args,**kwargs)